// import Vue from "vue";
import { createApp } from "vue";
import App from "./App.vue";
// 导入路由
import router from "./router";
// 导入pinia
import pinia from "./store";
// 导入element plus icon
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
// 导入element plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
// 导入element plus 国际化
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// svg图标
import "virtual:svg-icons-register";
// 引入全局样式
import "@/assets/css/common.scss";
// 阿里矢量图标库
// import '@/assets/aliIconfont/iconfont.css';

// 定义特性标志
window.__VUE_PROD_DEVTOOLS__ = false;
window.__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;

/* Vue.config.errorHandler = function (error, vm, info) {
  console.error("全局捕获到异常:", error, info);
  // 全局处理异常
}; */
// 创建实例
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(ElementPlus, {
  locale: zhCn,
});
app.use(router);
app.use(pinia);
// app.use(ElementPlus);
app.mount("#app");
